<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-06-10 16:01:58
 * @Description: 商品规格表
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-06-29 10:01:16
 * @FilePath: /qingshanERP/database/migrations/qingshanerp/2021_06_10_160158_create_good_spec.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGoodSpec extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('good_spec', function (Blueprint $table) {
            $table->id();
            $table->integer('good_id')->default(0)->comment('商品ID');
            $table->string('spec')->default('')->comment('规格名称');
            $table->string('sku_id')->default('')->comment('sku编码');
            $table->decimal('price', 10, 2)->default(0)->comment('规格售价');
            $table->boolean('is_sku_onsale')->default(1)->comment('是否在架上，0-下架中，1-架上');
            $table->boolean('del_flag')->default(0)->comment('删除状态，1 删除，0 未删除');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('good_spec');
    }
}
